<link rel="stylesheet" type="text/css" href="<?php echo base_url('common/home')?>/css/style.css" />
<style type="text/css">
.region_list li.region_item{float:left;margin-right:19px;}
#province_box,#city_box,#county_box{width:118px;height:42px;}
#province_box cite,#city_box cite,#county_box cite{width:116px; height:42px;line-height:42px;text-align:center;border:1px solid #868686; display:block; color:#807a62; cursor:pointer;font-style:normal;background:url(<?php echo base_url('common/home')?>/img/tob.png) no-repeat 100px center;}
#province_box ul,#city_box ul,#county_box ul{width:116px; background-color:#ffffff; position:absolute; z-index:50000;display:none;border: 1px solid #868686;border-top:none;height:168px;overflow-y:scroll;overflow-x:hidden;}
#province_box ul li,#city_box ul li,#county_box ul li{height:24px; line-height:24px;}
#province_box ul li a,#city_box ul li a,#county_box ul li a{width:116px;display:block; height:41px; color:#333333; text-decoration:none;border-bottom: 1px solid #868686;line-height: 41px;font-size:12px;}
#province_box ul li a:hover,#city_box ul li a:hover,#county_box ul li a:hover{background-color:#313131;color:#fff;}
</style>
<script type="text/javascript" src="<?php echo base_url('common/home')?>/js/jquery-1.10.2.js"></script>
<script type="text/javascript" src="<?php echo base_url()?>common/layer/layer.js"></script>
<script type="text/javascript" src="<?php echo base_url()?>common/home/js/jquery.form.js"></script>
<script type="text/javascript" src="<?php echo base_url()?>common/home/js/jquery.validate.js"></script>
<script type="text/javascript" src="<?php echo base_url()?>common/home/js/additional-methods.js"></script>
<script type="text/javascript" src="<?php echo base_url()?>common/home/js/validate.js"></script>
<script type="text/javascript" src="<?php echo base_url()?>common/home/js/validateForm.js"></script>
<script type="text/javascript" src="<?php echo base_url()?>common/js/jquery.Msg.js"></script>
<script type="text/javascript" src="<?php echo base_url()?>common/home/js/divselect.js"></script>
<script type="text/javascript">
    $(function () {
        var index = parent.layer.getFrameIndex(window.name);
        $(".cancelAddress").click(function () {
            parent.layer.close(index);
        });
        $(".alterClose").click(function () {
            parent.layer.close(index);
        });

        $.divselect("#province_box", "#province");
        $.divselect("#city_box", "#city");
        $.divselect("#county_box", "#county");
        $.customer_add('ajax_form');
    })
    function Success(data) {
        if (data.Statu == 'ok') {
            parent.Success(data,parent.layer.getFrameIndex(window.name));
        } else {
            parent.Success(data,parent.layer.getFrameIndex(window.name));
        }

    }
    $(function () {
        $("#p_url").val(parent.window.location.href);
        $("#backurl").val(parent.window.location.href);
    });
</script>
<!--修改地址弹窗 begin-->
<div class="bgalterAddress" style="display:block;">
    <div class="alterAddress" style="display:block;top:0;">
        <form id="ajax_form" method="post" action="<?php echo site_url('customer/add_customer_add')?>">
            <input type="hidden" id="customer_id" name="customer_id" value="<?php echo $customer_id?>"/>
            <input type="hidden" id="goods_order_id" name="goods_order_id" value="<?php echo $goods_order_id?>" />
            <input type="hidden" name="p_url" id="p_url" value="" />
            <input type="hidden" name="backurl" id="backurl" value="" />
            <img class="alterClose" src="<?php echo base_url('common/home')?>/img/hClose.png" width="22" height="21" alt="" style="cursor:pointer;" />

            <div class="clear"></div>

            <h1>收货信息</h1>

            <div class="receivePerson">
                <div class="receiveTxt">收货人：</div>
                <div class="receiveCon"><input id="c_name" name="c_name" type="text" placeholder="收货人姓名" /></div>
            </div>

            <div class="contactPhone">
                <div class="contactPhoneTxt">联系电话：</div>
                <div class="contactPhoneCon"><input id="phone" name="phone" type="text" placeholder="请输手机号码" /><input id="tel" name="tel" type="text" placeholder="备用电话（手机/固话）" /></div>
            </div>

            <div class="district">
                <div class="districtTxt">所在地区：</div>
                <div class="districtCon">
                    <ul class="region_list">
                        <li class="region_item">
                            <div id="province_box">
                                <cite>省 / 直辖市</cite>
                                <ul>
                                    <?php foreach($provincelist as $province):?>
                                    <li><a href="javascript:;" selectid="<?php echo $province->region_name?>" region_id="<?php echo $province->region_code?>"><?php echo $province->region_name?></a></li>
                                    <?php endforeach;?>
                                </ul>
                            </div>
                            <input name="province" type="hidden" value="" id="province" />
                        </li>
                        <li class="region_item">
                            <div id="city_box">
                                <cite>城市</cite>
                                <ul style="height:0;"></ul>
                            </div>
                            <input name="city" type="hidden" value="" id="city" />
                        </li>
                        <li class="region_item">
                            <div id="county_box">
                                <cite>乡镇 / 街道</cite>
                                <ul style="height:0;"></ul>
                            </div>
                            <input name="county" type="hidden" value="" id="county" />
                        </li>
                    </ul>

                </div>
            </div>

            <div class="detailAddress">
                <div class="detailAddressTxt">详细地址：</div>
                <div class="detailAddressCon"><textarea name="detailed_add" id="detailed_add" cols="30" rows="10"></textarea></div>
            </div>
            <input id="saveAddress" type="submit" value="保存" class="saveAddress" />
            <a class="cancelAddress" href="javascript:void(0);">取消</a>
        </form>
    </div>
</div>
<!--修改地址弹窗 end-->
